package com.joker.es.remote;


import com.joker.common.core.constant.ServiceNameConstants;
import com.joker.common.core.domain.Result;
import com.joker.es.remote.factory.ProductEsRemoteFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author lemon
 * @date 2024/12/18 16:43
 **/
@FeignClient(contextId = "remoteEsService", value = ServiceNameConstants.ES_SERVICE,fallbackFactory = ProductEsRemoteFallbackFactory.class)
public interface ProductEsRemote {
    /**
     * 同步数据
     * @param data 数据
     * @return
     */
    @PostMapping("/addBatch")
    Result<Boolean> addBatch(@RequestBody String data);
}
